-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter validation for /account/password/confirmReset #515 #516
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #516 +/- ##
===========================================
- Coverage 48.24% 44.75% -3.50%
===========================================
Files 58 64 +6
Lines 1312 1506 +194
Branches 154 183 +29
===========================================
+ Hits 633 674 +41
- Misses 649 801 +152
- Partials 30 31 +1 ☔ View full report in Codecov by Sentry. |
test('redirect to reset request page if missing parameters with flash parameter', async () => { | ||
const response = await testSession.get('/account/password/confirmReset') | ||
expect(response.statusCode).toBe(302) | ||
expect(response.headers.location).toContain('/account/requestPasswordReset?flash=') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you follow the request, you could expect for the "invalid request" and get the other code covered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not appear that following the request is configured as a standard option nor done as a current standard.
I would think i could test it using response.res.locals
but that's undefined
Reading from the text response you could check for <ul class=\"flash-errors\">
but thats present regardless of the case and is empty.
Potentially readable from session cookies but hit a wall there.
Will revisit this tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the website is broken everywhere, created a solution for your problem:
https://github.com/beckpaul/faf-website/pull/1/files
in general: flash messages are broken, they often have not the right structure (someone changed the layout)
tests: i restricted the tests and disallowed non localhost requests, so every request done needs to have a mock if not to localhost
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the questions above.
…y dont seem to be forwarded to the browser
@@ -12,7 +12,9 @@ services: | |||
context: . | |||
networks: | |||
- faf-stack | |||
|
|||
logging: | |||
driver: "json-file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will check and remove in next pr if not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already removed it, so you need to add it again... sry :)
address #515 via redirect to request password reset and flash a message.
Bit more whitespace removal just while grepping around.
Change to .gitignore - mostly for my sanity as i use asdf to control dev envs.
Might have some overlap with #514